﻿{% extends "super.html" %}
{% block title %}员工管理{% endblock %}
{% block s1 %}active{% endblock %}
{% block titlehref %}index{% endblock %}
{% block titlename %}全局动态{% endblock %}
{% block subtitlehref %}{% endblock %}
{% block subtitlename %}员工管理{% endblock %}
{% block content %}


<section id="main-content">
	<!-- START WRAPPER -->
	<section class="wrapper site-min-height">
		<!-- START ROW -->
		<div class="row">
			<div class="col-md-12">
				<div class="row" id="t1">
					<div class="col-lg-12">
						<section class="panel">
							<header class="panel-heading">
								<button class="btn btn-success" disabled>职工列表</button>
								<span class="tools pull-right">
                        <button onclick="create()" class="btn btn-success" data-toggle="modal" data-target="#myModal">新建职工</button>
                           </span>
							</header>

							<section class="panel">
								<header class="panel-heading">
									<i class="fa fa-tags">
									</i>
									<span class="label label-primary">
                    劳务工
                  </span>
									<span class="tools pull-right"><a href="javascript:;"
									                                  class="fa fa-chevron-down"></a><a
											href="javascript:;" class="fa fa-times"></a></span>
								</header>
								<div class="panel-body">
									<div class="adv-table">
										<table class="display table table-bordered table-striped" id="example1">
											<thead>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</thead>
											<tbody>
											{%for i in list1%}
											<tr>
												<td>
                                                {{i.Username}}
												</td>
												<td>
													{%if i.Sex == 1%}
													男
													{%else%}
													女
													{%endif%}
												</td>
												<td class="numeric">
                                                {{i.Own}}
												</td>
												<td class="numeric">
                                                {{i.Phone}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Create_time}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Qq}}
												</td>
											</tr>
											{%endfor%}
											</tbody>
											<tfoot>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</tfoot>
										</table>
									</div>
								</div>
							</section>

							<section class="panel">
								<header class="panel-heading">
									<i class="fa fa-tags">
									</i>
									<span class="label label-primary">
                    信息学院
                  </span>
									<span class="tools pull-right"><a href="javascript:;"
									                                  class="fa fa-chevron-down"></a><a
											href="javascript:;" class="fa fa-times"></a></span>
								</header>
								<div class="panel-body">
									<div class="adv-table">
										<table class="display table table-bordered table-striped" id="example2">
											<thead>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</thead>
											<tbody>
											{%for i in list2%}
											<tr>
												<td>
                                                {{i.Username}}
												</td>
												<td>
													{%if i.Sex == 1%}
													男
													{%else%}
													女
													{%endif%}
												</td>
												<td class="numeric">
                                                {{i.Own}}
												</td>
												<td class="numeric">
                                                {{i.Phone}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Create_time}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Qq}}
												</td>
											</tr>
											{%endfor%}
											</tbody>
											<tfoot>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</tfoot>
										</table>
									</div>
								</div>
							</section>

							<section class="panel">
								<header class="panel-heading">
									<i class="fa fa-tags">
									</i>
									<span class="label label-primary">
                    机械自动化学院
                  </span>
									<span class="tools pull-right"><a href="javascript:;"
									                                  class="fa fa-chevron-down"></a><a
											href="javascript:;" class="fa fa-times"></a></span>
								</header>
								<div class="panel-body">
									<div class="adv-table">
										<table class="display table table-bordered table-striped" id="example3">
											<thead>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</thead>
											<tbody>
											{%for i in list3%}
											<tr>
												<td>
                                                {{i.Username}}
												</td>
												<td>
													{%if i.Sex == 1%}
													男
													{%else%}
													女
													{%endif%}
												</td>
												<td class="numeric">
                                                {{i.Own}}
												</td>
												<td class="numeric">
                                                {{i.Phone}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Create_time}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Qq}}
												</td>
											</tr>
											{%endfor%}
											</tbody>
											<tfoot>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</tfoot>
										</table>
									</div>
								</div>
							</section>


							<section class="panel">
								<header class="panel-heading">
									<i class="fa fa-tags">
									</i>
									<span class="label label-primary">
                    电子学院
                  </span>
									<span class="tools pull-right"><a href="javascript:;"
									                                  class="fa fa-chevron-down"></a><a
											href="javascript:;" class="fa fa-times"></a></span>
								</header>
								<div class="panel-body">
									<div class="adv-table">
										<table class="display table table-bordered table-striped" id="example4">
											<thead>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</thead>
											<tbody>
											{%for i in list4%}
											<tr>
												<td>
                                                {{i.Username}}
												</td>
												<td>
													{%if i.Sex == 1%}
													男
													{%else%}
													女
													{%endif%}
												</td>
												<td class="numeric">
                                                {{i.Own}}
												</td>
												<td class="numeric">
                                                {{i.Phone}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Create_time}}
												</td>
												<td class="numeric hidden-phone">
                                                {{i.Qq}}
												</td>
											</tr>
											{%endfor%}
											</tbody>
											<tfoot>
											<tr>
												<th>
													姓名
												</th>
												<th>
													性别
												</th>
												<th class="numeric">
													所属部门
												</th>
												<th class="numeric">
													电话
												</th>
												<th class="numeric hidden-phone">
													入职日期
												</th>
												<th class="numeric hidden-phone">
													QQ
												</th>
											</tr>
											</tfoot>
										</table>
									</div>
								</div>
							</section>
						</section>
					</div>
				</div>
			</div>
		</div>
	</section>
	<!-- END WRAPPER -->
</section>

<script type="text/javascript" src="static/myjs/register.js"></script>
<script src="static/js/jquery.dcjqaccordion.2.7.js"></script><!-- ACCORDING JS -->
<script src="static/js/jquery.scrollTo.min.js"></script><!-- SCROLLTO JS  -->
<script src="static/js/jquery.nicescroll.js"></script><!-- NICESCROLL JS  -->
<script src="static/js/respond.min.js"></script><!-- RESPOND JS  -->
<script src="static/assets/fuelux/js/tree.min.js"></script><!-- TREE JS  -->
<script src="static/js/common-scripts.js"></script><!-- BASIC COMMON JS  -->
<script src="static/js/tree.js"></script><!-- TREE JS  -->
<script type="text/javascript" src="static/myjs/staff2.js"></script>
<script>
	<!-- TREE VIEW FUNCTION  -->
	jQuery(document).ready(function () {
				TreeView.init();

				$('#example1').dataTable({
					"aaSorting": [[4, "desc"]]
				});
				$('#example2').dataTable({
					"aaSorting": [[4, "desc"]]
				});
				$('#example3').dataTable({
					"aaSorting": [[4, "desc"]]
				});
				$('#example4').dataTable({
					"aaSorting": [[4, "desc"]]
				});
			}
	);

</script>

<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
     aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
					&times;
				</button>
				<h4 class="modal-title" id="myModalLabel">
					编辑职工信息
				</h4>
			</div>
			<div class="modal-body">
				<form id="updatenews" action="staff" method="post">
					<div class="panel-body">
						<input id="id" name="id" hidden>
						<input id="type" name="type" hidden>
						<input id="sex" name="sex" hidden>
						<input id="option" name="option" value="CCC" hidden>
						<input id="own" name="own" value="1" hidden>
						<div class="form-group">
							<label for="exampleInputPassword1">姓名</label>
							<input type="text" class="form-control" id="username" name="username"
							       placeholder="请输入姓名">
						</div>
						<div class="form-group">
							<label for="exampleInputPassword1">密码</label>
							<input type="password" class="form-control" id="password" name="password"
							       placeholder="请输入6~20位密码">
						</div>
						<div class="form-group">
							<label for="exampleInputPassword1">身份证</label>
							<input type="number" class="form-control" id="ident" name="ident"
							       placeholder="请输入18位身份证">
						</div>
						<div class="form-group">
							<label for="exampleInputPassword1">电话</label>
							<input type="number" class="form-control" id="phone" name="phone"
							       placeholder="请输入7~11位电话号码">
						</div>
						<div class="form-group">
							<label for="exampleInputPassword1">性别</label><br>
							<div class="btn-group" data-toggle="buttons">
								<label class="btn btn-default active">
									<input class="sex" type="radio" id="option1" checked>
									男
								</label>
								<label class="btn btn-default">
									<input class="sex" type="radio" id="option2">
									女
								</label>
							</div>
						</div>
						<div class="form-group">
							<label for="exampleInputPassword1">类型</label><br>
							<div class="btn-group" data-toggle="buttons">
								<label class="btn btn-default active">
									<input class="type" type="radio" id="option3" checked>
									教师
								</label>
								<label class="btn btn-default">
									<input class="type" type="radio" id="option4">
									劳务工
								</label>
							</div>
						</div>

						<div class="form-group">
							<label for="exampleInputPassword1">所在部门：仅为教师时有效</label><br>
							<div class="btn-group">
								<button class="btn btn-white" type="button" id="desc">
									信息学院
								</button>
								<button data-toggle="dropdown" class="btn btn-white dropdown-toggle"
								        type="button"><span class="caret"></span></button>
								<ul role="menu" class="dropdown-menu">
									<li><a href="javascript:void(0);" onclick="choose(1,'信息学院')">信息学院</a>
									</li>
									<li><a href="javascript:void(0);"
									       onclick="choose(2,'机械自动化学院')">机械自动化学院</a></li>
									<li><a href="javascript:void(0);" onclick="choose(3,'电子学院')">电子学院</a>
									</li>
								</ul>
							</div>

						</div>

						<div class="form-group">
							<label for="exampleInputPassword1">薪资</label>
							<input type="number" class="form-control" id="reap" name="reap"
							       placeholder="请输入职工薪资">
						</div>
						<div class="form-group">
							<label for="exampleInputPassword1">QQ</label>
							<input type="number" class="form-control" id="qq" name="qq"
							       placeholder="填写QQ有便于联系您">
						</div>

					</div>
				</form>

			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭
				</button>
				<button id="update" type="button" class="btn btn-primary">
					提交更改
				</button>
			</div>
		</div><!-- /.modal-content -->
	</div><!-- /.modal -->
</div>

{% endblock%}

<section class="panel">
	<header class="panel-heading">
		<i class="fa fa-tags">
		</i>
		<span class="label label-primary">
                    劳务工
                  </span>
		<span class="tools pull-right">
                    <a href="javascript:;" class="fa fa-chevron-down">
                    </a>
                    <a href="javascript:;" class="fa fa-times">
                    </a>
                  </span>
	</header>
	<div class="panel-body" style="display: block;">
		<section id="unseen">
			<table class="table table-bordered table-striped table-condensed">
				<thead>
				<tr>
					<th>
						姓名
					</th>
					<th>
						性别
					</th>
					<th class="numeric">
						所属部门
					</th>
					<th class="numeric">
						电话
					</th>
					<th class="numeric hidden-phone">
						入职日期
					</th>
					<th class="numeric hidden-phone">
						QQ
					</th>
				</tr>
				</thead>
				<tbody>
				{%for i in list1%}
				<tr>
					<td>
                    {{i.Username}}
					</td>
					<td>
						{%if i.Sex == 1%}
						男
						{%else%}
						女
						{%endif%}
					</td>
					<td class="numeric">
                    {{i.Own}}
					</td>
					<td class="numeric">
                    {{i.Phone}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Create_time}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Qq}}
					</td>
				</tr>
				{%endfor%}
				</tbody>
			</table>
		</section>
	</div>
</section>
<section class="panel">
	<header class="panel-heading">
		<i class="fa fa-tags">
		</i>
		<span class="label label-primary">
                    信息学院
                  </span>
		<span class="tools pull-right">
                    <a href="javascript:;" class="fa fa-chevron-down">
                    </a>
                    <a href="javascript:;" class="fa fa-times">
                    </a>
                  </span>
	</header>
	<div class="panel-body" style="display: block;">
		<section id="unseen">
			<table class="table table-bordered table-striped table-condensed">
				<thead>
				<tr>
					<th>
						姓名
					</th>
					<th>
						性别
					</th>
					<th class="numeric">
						所属部门
					</th>
					<th class="numeric">
						电话
					</th>
					<th class="numeric hidden-phone">
						入职日期
					</th>
					<th class="numeric hidden-phone">
						QQ
					</th>
				</tr>
				</thead>
				<tbody>
				{%for i in list2%}
				<tr>
					<td>
                    {{i.Username}}
					</td>
					<td>
						{%if i.Sex == 1%}
						男
						{%else%}
						女
						{%endif%}
					</td>
					<td class="numeric">
                    {{i.Own}}
					</td>
					<td class="numeric">
                    {{i.Phone}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Create_time}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Qq}}
					</td>
				</tr>
				{%endfor%}
				</tbody>
			</table>
		</section>
	</div>
</section>
<section class="panel">
	<header class="panel-heading">
		<i class="fa fa-tags">
		</i>
		<span class="label label-primary">
                    机械自动化学院
                  </span>
		<span class="tools pull-right">
                    <a href="javascript:;" class="fa fa-chevron-down">
                    </a>
                    <a href="javascript:;" class="fa fa-times">
                    </a>
                  </span>
	</header>
	<div class="panel-body" style="display: block;">
		<section id="unseen">
			<table class="table table-bordered table-striped table-condensed">
				<thead>
				<tr>
					<th>
						姓名
					</th>
					<th>
						性别
					</th>
					<th class="numeric">
						所属部门
					</th>
					<th class="numeric">
						电话
					</th>
					<th class="numeric hidden-phone">
						入职日期
					</th>
					<th class="numeric hidden-phone">
						QQ
					</th>
				</tr>
				</thead>
				<tbody>
				{%for i in list3%}
				<tr>
					<td>
                    {{i.Username}}
					</td>
					<td>
						{%if i.Sex == 1%}
						男
						{%else%}
						女
						{%endif%}
					</td>
					<td class="numeric">
                    {{i.Own}}
					</td>
					<td class="numeric">
                    {{i.Phone}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Create_time}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Qq}}
					</td>
				</tr>
				{%endfor%}
				</tbody>
			</table>
		</section>
	</div>
</section>
<section class="panel">
	<header class="panel-heading">
		<i class="fa fa-tags">
		</i>
		<span class="label label-primary">
                    电子学院
                  </span>
		<span class="tools pull-right">
                    <a href="javascript:;" class="fa fa-chevron-down">
                    </a>
                    <a href="javascript:;" class="fa fa-times">
                    </a>
                  </span>
	</header>
	<div class="panel-body" style="display: block;">
		<section id="unseen">
			<table class="table table-bordered table-striped table-condensed">
				<thead>
				<tr>
					<th>
						姓名
					</th>
					<th>
						性别
					</th>
					<th class="numeric">
						所属部门
					</th>
					<th class="numeric">
						电话
					</th>
					<th class="numeric hidden-phone">
						入职日期
					</th>
					<th class="numeric hidden-phone">
						QQ
					</th>
				</tr>
				</thead>
				<tbody>
				{%for i in list4%}
				<tr>
					<td>
                    {{i.Username}}
					</td>
					<td>
						{%if i.Sex == 1%}
						男
						{%else%}
						女
						{%endif%}
					</td>
					<td class="numeric">
                    {{i.Own}}
					</td>
					<td class="numeric">
                    {{i.Phone}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Create_time}}
					</td>
					<td class="numeric hidden-phone">
                    {{i.Qq}}
					</td>
				</tr>
				{%endfor%}
				</tbody>
			</table>
		</section>
	</div>
</section>